﻿using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Oragon.Architecture.Data.SqlBuilder;
using Oragon.Architecture.Data.SqlBuilder.Operators;
using Oragon.Architecture.Data.QueryBuilder.SqlServer;

namespace Oragon.Architecture.Data.QueryBuilder.Tests
{
    [TestFixture]
    public class UpdateSQLBuilderTest
    {
        [Test]
        public void UpdateSQLBuilderTest_1()
        {
            UpdateSQLBuilder target = new UpdateSQLBuilder();
			target.TableName = LiteralManager.GetLiteralBuilder().BuildTableName("Table01");
			target.CollumnsAndValues.Add(new SetItem(LiteralManager.GetLiteralBuilder().BuildColumnName("Coluna1"), LiteralManager.GetLiteralBuilder().BuildParameter("Coluna1")));
			target.WhereClause.Items.Add(new EqualToOperator(LiteralManager.GetLiteralBuilder().BuildColumnName("ID"), LiteralManager.GetLiteralBuilder().BuildParameter("ID")));
            string actual = target.ToSQL();
            Assert.AreEqual(Oragon.Architecture.Data.QueryBuilder.Tests.Properties.Resources.UpdateSQLBuilderTest_1, actual.Trim());
        }

    }
}
